<?php /* Smarty version 2.6.16, created on 2013-08-31 20:46:52
         compiled from d:%5Cwww%5Cclient%5Cgetbids/templates/default//modules/register/register2.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_start'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
  echo '<link rel="stylesheet" type="text/css" href="';  echo $this->_tpl_vars['siteroot'];  echo '/templates/default/style/registration.css"><script type="text/javascript" src="';  echo $this->_tpl_vars['siteroot'];  echo '/includes/js/register.js"></script><script src="';  echo $this->_tpl_vars['siteroot'];  echo '/includes/js/admin/ajax.js" type="text/javascript" ></script>'; ?>

<?php echo '
<script type="text/javascript">
function getSelectedCheckbox(buttonGroup) {
   // Go through all the check boxes. return an array of all the ones
   // that are selected (their position numbers). if no boxes were checked,
   // returned array will be empty (length will be zero)
   var retArr = new Array();
   var lastElement = 0;
   if (buttonGroup[0]) { // if the button group is an array (one check box is not an array)
      for (var i=0; i<buttonGroup.length; i++) {
         if (buttonGroup[i].selected) {
            retArr.length = lastElement;
            retArr[lastElement] = i;
            lastElement++;
         }
      }
   } else { // There is only one check box (it\'s not an array)
      if (buttonGroup.selected) { // if the one check box is checked
         retArr.length = lastElement;
         retArr[lastElement] = 0; // return zero as the only array value
      }
   }
   return retArr;
} // Ends the "getSelectedCheckbox" function
  
  function getSelectedCheckboxValue(buttonGroup) {
   // return an array of values selected in the check box group. if no boxes
   // were checked, returned array will be empty (length will be zero)
   var retArr = new Array(); // set up empty array for the return values
   var selectedItems = getSelectedCheckbox(buttonGroup);
   if (selectedItems.length != 0) { // if there was something selected
      retArr.length = selectedItems.length;
      for (var i=0; i<selectedItems.length; i++) {
         if (buttonGroup[selectedItems[i]]) { // Make sure it\'s an array
            retArr[i] = buttonGroup[selectedItems[i]].value;
         } else { // It\'s not an array (there\'s just one check box and it\'s selected)
            retArr[i] = buttonGroup.value;// return that value
         }
      }
   }
   return retArr;
}

function in_array(array, id) {
    for(var i=0;i<array.length;i++) {
        if(array[i][0] === id) {
            return true;
        }
    }
    return false;
}

function showJobType(k){
	
	if(k!=\'\')
		document.getElementById("checkfirst").style.display=\'block\';
	else
		document.getElementById("checkfirst").style.display=\'none\';	
	var namecat = document.getElementsByName("catname[]");
	var newstr=\'\';
	var myArray=new Array(); 
	for(var i=0; i< namecat.length;i++)
	{
		var str =\'\';
		str = namecat.item(i).value;
		
		if(str !=\'\')
		{
			
			if(in_array(myArray, str))
			{
				document.getElementById("catname_"+i).value=\'\';
				alert("Please select different category!");
				return false;				
			}
			else
			{
				myArray[i] =str;
				if(newstr == \'\')
				{
					newstr=str;	
				}
				else
				{
					newstr = newstr+\',\'+str;	
				}
			}
			
		}
	}
	//alert(newstr);
//	return false;
//		var fl = 0;
//	var chk_arr = new Array();
//	var checkBoxArr = getSelectedCheckboxValue(document.frmTradesmanAdd.catname);	
	//alert(checkBoxArr);
	//document.getElementById(\'hidediv\').style.display=\'block\';
	if(k!=\'\')
		ajax.sendrequest("GET",SITEROOT + "/modules/register/show_jobtype.php",{jid:newstr},"","isJobType");
}

</script>
'; ?>


<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_end'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<!-- MIDDLE CONTAIN GOES HERE -->
<section class="inner_wrapper">
<section class="middle_portion">
	<h1 class="registr_head">registration</h1>
    <section class="regis_steps_breadcrum_wrapper">
        <section class="lF"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/register_steps/registr_step1_ho.png"></section>
        <section class="lF"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/register_steps/registr_step2.png"></section>
        <section class="lF"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/register_steps/registr_step3.png"></section>
        <section class="lF"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/register_steps/registr_step4.png"></section>
        <section class="lF"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/default/images/register_steps/registr_step5.png"></section>
        <section class="clear"></section>
    </section>    
        <span class="lF">
            <h2 class="heading2">Provider Registration</h2>    
        </span>                 
     <section class="clear"></section>
    <form id="frmTradesmanAdd" name="frmTradesmanAdd" method="POST" action="<?php echo $this->_tpl_vars['siteroot']; ?>
/register/step2/">   
    <section class="regist_form no_bor">
      <h1>select your trade</h1>
      <div id = "feeratetable1">
    	<dl class="minht70">
        <select class="input3" name="catname[]" id="catname_0" onchange="showJobType(this.value);">
            <option value="">Select trade category</option>
            <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['newtradecategoryArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                <option value="<?php echo $this->_tpl_vars['newtradecategoryArray'][$this->_sections['i']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['newtradecategoryArray'][$this->_sections['i']['index']]['trade_category']; ?>
</option>
            <?php endfor; endif; ?> 
        </select>
            <section class="clear"></section>
        </dl>
         <section class="clear"></section>
         </div>                 
       <section class="clear"></section>
        <div id="checkfirst" style="display:none;">            
        <a href="javascript:void(0);" onClick="addFixedRateRow();" class="blue_btn margintp_bt admore" >Add more service sections </a>&nbsp;&nbsp; 
        <a href="javascript:void(0);" onClick="removeFixedRateRow();" class='org_btn admore'>Remove</a>
        </div>
              	 <!--<a href="javascript:void(0);" onClick="removeFixedRateRow();" class="txtColor">Remove</a>-->
        
         <input type="hidden" value="0" id="feeratedivValue" name="feeratedivValue" />
            <input type="hidden" name="feerateDiv" id="feerateDiv"  />
            
             
             
                   
       <!-- <section class="clear"></section>
        <dl>
                	<select class="input3" name="catname[]" id="catname1" onchange="showJobType();">
                    	<option value="">Select Industry category</option>
                        <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['newtradecategoryArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                        	<option value="<?php echo $this->_tpl_vars['newtradecategoryArray'][$this->_sections['i']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['newtradecategoryArray'][$this->_sections['i']['index']]['trade_category']; ?>
</option>
                        <?php endfor; endif; ?> 
                    </select>
            <section class="clear"></section>
        </dl>-->
		<section class="clear"></section>
      	  <section class="clear"></section>
       </section> 
     <section><input type="submit" class="blue_btn margintp_bt rF" value="Next"  name="btnstep3" id="btnstep3"></section>
      <section class="clear"></section>
    </form>  
</section>
</section>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footer'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>